
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains

driver = webdriver.Chrome()

driver.get('https://www.baidu.com/')

inpuntTag = driver.find_element_by_id('kw')

submitBtn = driver.find_element_by_id('su')

actions = ActionChains(driver)

# actions.move_to_element(inpuntTag)
actions.send_keys_to_element(inpuntTag, 'python')

actions.move_to_element(submitBtn)
actions.click()

actions.context_click()

# 提交行为链上的操作
actions.perform()



